#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <windows.h>

//int NumOfOne(int n)
//{
//	int count = 0;
//	while (n){
//		n = n&(n - 1);
//		count++;
//	}
//	return count;
//}

int Compare(int a,int b)
{
	int n = a ^ b;
	int count = 0;
	while (n){
		n = n&(n - 1);
		count++;
	}
	return count;
}

int main()
{
	int num1,num2;
	scanf("%d %d", &num1, &num2);
	printf(" %d λͬ\n", Compare(num1, num2));
	system("pause");
	return 0;
}


